#include <iostream>
using namespace std;

class Building
{
  // goodGay全局函数是Building的好朋友，可以访问Building中的私有属性
  friend void goodGay(Building &building);

public:
  Building()
  {
    m_sittingRoom = "客厅";
    m_bedRoom = "卧室";
  }

public:
  string m_sittingRoom; // 客厅

private:
  string m_bedRoom; // 卧室
};

// 全局函数

void goodGay(Building &building)
{
  cout << "好基友的全局函数 正在访问：" << building.m_sittingRoom << endl;
  cout << "好基友的全局函数 正在访问：" << building.m_bedRoom << endl;
}

void test01()
{
  Building building;
  goodGay(building);
}

int main(int argc, char const *argv[])
{
  test01();

  return 0;
}